<?php 
if( $code == 0 )
{
	$array = array();
	$array['err_code'] = 0;
	$array['data'] = $data;
	header('Content-type: application/json');
	echo json_encode( $array );
}
else
{
	$array = array();
	$array['err_code'] = intval($code);
	$array['message'] = $message;
	header('Content-type: application/json');
	echo json_encode( $array );
} 
?>
